package cn.i7baozh.cloud.consumer.feign.config;

import feign.Logger;
import feign.Retryer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author zhangbaoqi532
 * @date 2024/12/26
 */
@Configuration
public class FeignConfig {

    @Bean
    Logger.Level feignLoggerLevel() {
        return Logger.Level.FULL;
    }

    @Bean
    public Retryer myRetryer(){
        return Retryer.NEVER_RETRY;// 默认值
        //一共请求次数为3次（1+2），初始间隔100毫秒，重试间隔1秒
//        return new Retryer.Default(1000, 2, 3);
    }
}
